

#include <string.h>
#include "xota+crypto+hash.h"

#include "sha256.h"

sha256_context_t sha256_context; 

bool xota_crypto_hash_compute( const uint8_t* p_data, uint32_t size, uint8_t * hash)
{
	if( p_data == NULL || hash == NULL )
		return false; 
	
	
	
	(void) sha256_init( & sha256_context ); 
	(void) sha256_update( & sha256_context, p_data, size ); 
	(void) sha256_final( & sha256_context, hash, 0 ); 

	return true; 
}



